// const list = { template: 'question/list' }
// const detail = { template: 'question/detail' }
// const routes = [
//     { path : '/', component:list },
//     { path: '/:id', component: detail }
// ]
// const router = new VueRouter({
//     routes // (缩写) 相当于 routes: routes
// })


var app = new Vue({
    el:'#app',
    // router,
    data:{
        questions:[
            {
                id:1,
                title:'关于使用wireshark抓取报文实验',
                userid:"1",
                user:{

                },
                subject:'计算机网络',
                createTime:'today',
                ansNum:'5',
            },
        ]
    },
    methods:{
        // questionDetail(id){
        //     // console.log(this);
        //
        //     this.$router.push({ name: 'id', params: { id }});
        // }
    },
    mounted:function (){

        // console.log("mounted!");
        axios.get('http://localhost:8095/page/0').then(
            (response)=>{
                // console.log(response);
                this.questions = response.data;
            }
        )
    }

})